﻿using System;

namespace Entities
{
    [Serializable]
    public class Coaches
    {
        private int coachID;
        private int coachTypeID;
        public Coaches()
        { }
        public Coaches(int coachID, int coachTypeID)
        {
            this.coachID = coachID;
            this.coachTypeID = coachTypeID;
        }
        public int CoachID
        {
            get { return this.coachID; }
            set
            {
                if (value < 0)
                    throw new Exception("coachID not allow nullvalue.");
                this.coachID = value;
            }
        }
        public int CoachTypeID
        {
            get { return this.coachTypeID; }
            set { this.coachTypeID = value; }
        }
        public override string ToString()
        {
            return this.coachID + "; " + this.coachTypeID + "; ";
        }
        public override bool Equals(Object obj)
        {
            Coaches me = (Coaches)obj;
            bool ret = this.CoachID.Equals(me.CoachID);
            return ret;
        }
        public override int GetHashCode()
        {
            return this.CoachID.GetHashCode();
        }

    }
}